package com.daisuxia.web.pojo.fuyou;

import java.util.Map;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import com.daisuxia.back.utils.SysCacheUtils;
import com.daisuxia.web.pojo.BackConfigParams;
import com.fuiou.util.MD5;

/**
 * user : yuanyiwen
 * date : 2017年3月16日15:44:48
 */
@XmlRootElement(name = "ORDER")
@XmlAccessorType(XmlAccessType.FIELD)
public class OrderQuerySend {
	//版本号
	private String VERSION = "1.0";
	//商户代码
    private String MCHNTCD;
    //商户流水号
    private String MCHNTORDERID;
    //保留字段 1
    private String REM1;
    //保留字段 2
    private String REM2;
    //保留字段 3
    private String REM3;
    //摘要数据
    private String SIGN;

    public String getVERSION() {
		return VERSION;
	}

	public void setVERSION(String vERSION) {
		VERSION = vERSION;
	}

	public String getMCHNTCD() {
		return MCHNTCD;
	}

	public void setMCHNTCD(String mCHNTCD) {
		MCHNTCD = mCHNTCD;
	}

	public String getMCHNTORDERID() {
		return MCHNTORDERID;
	}

	public void setMCHNTORDERID(String mCHNTORDERID) {
		MCHNTORDERID = mCHNTORDERID;
	}

	public String getREM1() {
		return REM1;
	}

	public void setREM1(String rEM1) {
		REM1 = rEM1;
	}

	public String getREM2() {
		return REM2;
	}

	public void setREM2(String rEM2) {
		REM2 = rEM2;
	}

	public String getREM3() {
		return REM3;
	}

	public void setREM3(String rEM3) {
		REM3 = rEM3;
	}

	public String getSIGN() {
		return SIGN;
	}

	public void setSIGN(String sIGN) {
		SIGN = sIGN;
	}

	public String toSign(){
        Map<String, String> keys = SysCacheUtils.getConfigParams(BackConfigParams.FUYOU);
        String key = keys.get("KEY");
        return MD5.MD5Encode(VERSION + "|" + MCHNTCD + "|" + MCHNTORDERID + "|" + key);
    }
}
